
<script>
export default {
  props: {
    value: {
      type: String,
      default: '',
    }
  },
  data(){
    return{
      currValue:this.value,
    }
  },
  render(h){
    let _this = this;
    return h('div',[
      h('span','留言内容：'),
      h('textarea',{
        attrs: {placeholder: '请输入留言内容'},
        domProps: {
          value: this.currValue,
        },
        on: {
          input(event){
            _this.currValue = event.target.value;
            _this.$emit('input',event.target.value)
          }
        }
      })
    ])
  },
  methods: {
    focus(){
      this.$refs.message.focus();
    }
  },
  watch:{
    value(){
      this.currValue = this.value;
    }
  }
}
</script>
<style scoped>

</style>


